﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ajaxfileupload.ascx.cs"
    Inherits="Presentation.Controls.ajaxfileupload" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<script type="text/javascript">
    function uploadError(sender, args) {
        addToClientTable(args.get_fileName(), "<span style='color:red;'>" + args.get_errorMessage() + "</span>");
    }
    function uploadComplete(sender, args) {
        var contentType = args.get_contentType();
        var text = args.get_length() + " bytes";
        if (contentType.length > 0) {
            text += ", '" + contentType + "'";
        }
        addToClientTable(args.get_fileName(), text);
    }
</script>
<div>
    <asp:Label ID="lblTitulo" runat="server" Text="Titulo:" Width="50px"></asp:Label><asp:TextBox
        Width="150px" ID="txtTitulo" runat="server" SkinID="adminFormTextBoxSkin"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="(*) Requerido" ControlToValidate="txtTitulo"></asp:RequiredFieldValidator>
        <br />
    <asp:Label ID="lblAlt" runat="server" Text="Alt:" Width="50px"></asp:Label><asp:TextBox
        Width="150px" ID="txtAlt" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="(*) Requerido" ControlToValidate="txtAlt"></asp:RequiredFieldValidator>
        <br />
    <ajaxToolkit:AsyncFileUpload runat="server" ID="AsyncFileUpload" Width="200px" UploaderStyle="Modern"
        UploadingBackColor="#CCFFFF" ThrobberID="myThrobber" OnUploadedFileError="AsyncFileUpload_OnUploadedFileError"
        OnUploadedComplete="AsyncFileUpload_OnUploadedComplete"  />
    <asp:Label runat="server" ID="myThrobber" Style="display: none;"><img align="absmiddle" alt="" src="../Images/uploading.gif" /></asp:Label>
    <asp:Label runat="server" Text="&nbsp;" ID="uploadResult" />
    <br />
    <asp:Button ID="btnGuardar" runat="server" Text="AgregarImagen" OnClick="btnGuardar_Click" />
</div>
